from django.urls import path
# 从当前目录导入views.py
from . import views

# 加载路由
urlpatterns = [
    # 基于FBV的GET请求：query方式传递
    path("get_fbv/", views.get_query),

    # 基于FBV的GET请求：path方式传参
    path("get_fbv/<str:q>/<int:num>", views.get_path),

    # 基于FBV的GET请求：接收format数据
    path("post_fbv_formdata/", views.post_formdata),

    # 基于FBV的POST请求：接收JSON数据
    path("post_fbv_json/", views.post_json),
]